package org.stone.project;

import reactor.core.Disposable;
import reactor.core.publisher.Hooks;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;

public class ReactorDemo2 {
    public static void main(String[] args) throws InterruptedException {
        Mono<String> mono = Mono.just("你好")
                .map(e -> {
                    System.out.println("你好");
                    return e;
                })
                .doOnNext(e->{
                    System.out.println("demo");
                })
                .doOnRequest(e->{
                    System.out.println("====");
                })
                .subscribeOn(Schedulers.parallel())
                ;
        Disposable subscribe = mono.subscribe(e -> {
            System.out.println("111");
            return;
        });



//        Thread.currentThread().join();
    }
}
